package org.edu.service.impl;

import java.util.List;

import org.edu.dao.ProjectDao;
import org.edu.model.Project;
import org.edu.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("projectService")
public class ProjectServiceImpl implements ProjectService {

	@Autowired
	private ProjectDao projectDao;
	public ProjectServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Transactional
	public void save(Project project) throws Exception {
		projectDao.save(project);
	}

	@Transactional
	public void update(Project project) throws Exception {
		projectDao.update(project);
	}

	@Transactional
	public void remove(Project project) throws Exception {
		projectDao.remove(project);
	}

	@Transactional
	public List<Project> projects() {
		return projectDao.projects();
	}

	@Transactional
	public Project findById(Long project_id) throws Exception {
		return projectDao.findById(project_id);
	}

}
